/*
+--------------------------------------------------------
+	Copyright (c) 2004-2007 WeSofts
+	JavaScript Project for wespace
+	http://www.wesofts.com
+--------------------------------------------------------
*/
document.write('<div id="titlealtlayer" style="position:absolute;z-index:1000;padding:4px;font-size:12px;border:1px solid #000;background-color:#ffc;display:none;"></div>');
var titleoraltvalue = null;
function showtitlealtlayer(element){
	if(element.srcElement){
		object = element.srcElement;
	}else{
		object = element.target;
	}
	if (typeof(object)!='undefined'){
		MouseX=element.clientX;
		MouseY=element.clientY;
		if (typeof(object.alt) != 'undefined'){
			if(object.alt!=null && object.alt!=""){
				object.pvalue=object.alt;
				object.alt="";
			}
		}
		if (typeof(object.title) != 'undefined'){
			if(object.title!=null && object.title!=""){
				object.pvalue=object.title;
				object.title="";
			}
		}
		if(object.pvalue!=titleoraltvalue){
			titleoraltvalue=object.pvalue;
			if(titleoraltvalue==null || titleoraltvalue==""){
				document.getElementById("titlealtlayer").style.display="none";        
			}else{
				document.getElementById("titlealtlayer").style.display="";
				showlayer();
			}
		}
	}
}
function showlayer(){
	document.getElementById("titlealtlayer").innerHTML = titleoraltvalue.replace(/\\n/g,"<br>");
	layerwidth	= document.getElementById("titlealtlayer").clientWidth;
	layerheight	= document.getElementById("titlealtlayer").clientHeight;
	if(MouseX+12+layerwidth>document.body.clientWidth){
		popLeftAdjust=-layerwidth-24;
	}else{
		popLeftAdjust=0;
	}
	if(MouseY+12+layerheight>document.body.clientHeight){
		popTopAdjust=-layerheight-24;
	}else{
		popTopAdjust=0;
	}
	ScrlL = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft;
	ScrlT = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
	LayerposX = MouseX+popLeftAdjust+ScrlL;LayerposY = MouseY+popTopAdjust+ScrlT+18;
	document.getElementById("titlealtlayer").style.left=LayerposX + 'px';
	document.getElementById("titlealtlayer").style.top=LayerposY + 'px';
}
// Element as onmouse event.
if(!document.onmouseover){
	document.onmouseover = function(element){
		if (!element){
			showtitlealtlayer(window.event);
		}else{
			showtitlealtlayer(element);
		}
	}
}